#ifndef __ADPM_ALLOC_H__
#define __ADPM_ALLOC_H__

#include "tools.h"
#include "fs.h"
#include <linux/kthread.h>

//全局分配器
extern struct adpm_allocator *adpm_buddy;

int adpm_init_buddy(struct adpm_page *base_vir, long start_pfn ,long nr_pages, struct adpm_sb_info *sbi);
void adpm_destroy_buddy(void);
struct adpm_page *adpm_buddy_get_one_page(bool no_swap);
void adpm_buddy_free_one_page(struct adpm_page *pg);
int adpm_make_dirty(struct adpm_client_file *f, unsigned long vir_start, unsigned long len);

#endif
